<div class="row">
	<div class="span3">
		<?php $this->widget(Yii::app()->getModule('user')->getWidget('HUserDashboardProfileWidget'), array(
			'user' => $user,
		)); ?>
	</div>

	<div class="span4">
		<div class="h-profile-right">
			<?php if (count($userCoursesTaking)) : ?>
			<div>
				<h3>Courses you are taking</h3>
				<ul>
					<?php foreach ($userCoursesTaking as $yourCourse) : ?>
					<li><?php echo CHtml::link($yourCourse->course->department->name . ' - ' . $yourCourse->course->name, array('#')); ?></li>
					<?php endforeach; ?>
				</ul>
			</div>
			<?php endif; ?>
			<?php if (count($userCoursesTaken)) : ?>
			<div>
				<h3>Courses you have taken</h3>
				<ul>
					<?php foreach ($userCoursesTaken as $yourCourse) : ?>
					<li><?php echo CHtml::link($yourCourse->course->department->name . ' - ' . $yourCourse->course->name, array('#')); ?></li>
					<?php endforeach; ?>
				</ul>
			</div>
			<?php endif; ?>
			<div>
				<h3>Recent Textbooks</h3>
				<ul class="h-textbook-sidebar">
					<?php foreach ($books as $book) : ?>
					<li>
						<a href="#"><img class="thumbnail" src="<?php echo $book->thumbnail; ?>" /></a>
						<div class="h-float-right">
							<h4><?php echo CHtml::link($book->title, array('/textbooks/book/details', 'book_id'=>$book->id)); ?></h4>
							<p><?php echo date('F j, Y h:i a', $book->created); ?></p>
						</div>
					</li>
					<?php endforeach; ?>
				</ul>
				<a href="<?php echo Yii::app()->createUrl('/textbooks/book/manage'); ?>">Show all</a>
			</div>
		</div>
	</div>

	<div class="span5">
		<div class="h-wall">
			<legend><?php echo $user->profiles->fullname; ?>'s Wall</legend>
			<?php $this->widget(Yii::app()->getModule('facebook')->getPlugins('Comments'), array(
				'href' => Yii::app()->createAbsoluteUrl('/textbooks/profile/index', array('user_id'=>$user->id)),
				'width' => 430,
			)); ?>
		</div>
	</div>
</div>